Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming


Using preprocessor names and directives

All built-in preprocessor names are supported in classes. These names include BATCH-MODE, FILE-NAME, LINE-NUMBER, OPSYS, SEQUENCE and WINDOW-SYSTEM. The following SpeedScript® built-in preprocessor names are also supported: DISPLAY, OUT, OUT-FMT, OUT-LONG and WEBSTREAM.

All preprocessor directives, such as &IF, &GLOBAL-DEFINE, and &SCOPED-DEFINE, can be used in classes and behave as they do in procedures. &SCOPED-DEFINE defines a compile-time constant or preprocessor name that is in scope from the line that defines it, until the end of the source file that defines it (which may be a class, procedure, or include file). &GLOBAL-DEFINE defines a compile-time constant that is in scope from the line that defines it through to the end of the compilation unit. In the case of a class, this means until the end of the class definition, including any referenced include files.

There is no preprocessor directive that defines a compile-time constant that is in scope for the entire class hierarchy.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095